define(function(require){
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");

	var Model = function(){
		this.callParent();
		this.url = "http://yun.jiawoltd.com";
		this.sdetailId;
		this.pnode;
		this.detail;
	};

	Model.prototype.modelParamsReceive = function(event){
		sdetailId = this.params.id;
		pnode = this.params.nodeId;
		var me = this;
		$.ajax({
				cache : false,
				type : "GET",
				timeout : 20000, // 超时时间设置，单位毫秒
				url : this.url + "/mobile/getScglDetail/" + pnode + "/" + sdetailId,
				data : {},
				async : false,
				error : function(request) {
				},
				success : function(resp) {
					detail = resp;
					var carouse = me.comp("carousel1");
					
					var carousel = me.comp("carousel1");
			        var contents = me.comp("contents1");
			        carousel.removeAll();
			        carousel.add('<img src="" class="image-wall tb-img"/>');
			        contents.to(0)
					
					if(resp.imgUrls){
						for(var i=0; i< resp.imgUrls.length; i++){
							if (i == 0) {
			                    $(carousel.domNode).find("img").eq(0).attr({
			                        "src" : resp.imgUrls[i]
			                    });
			                } else {
			                    carousel.add('<img src="' + resp.imgUrls[i] + '" class="tb-img1"/>');
			                }
						}
					}
					var sc = $(me.getElementByXid("h52"));
					sc.html("操   作  人："+resp.operats);
					var sc = $(me.getElementByXid("h53"));
					sc.html("操作时间："+resp.optime);
				}
			});
		
	};

	Model.prototype.modelLoad = function(event){
		
	};

	return Model;
});